<include file="Public/head" />

<body>
  <div class="panel admin-panel">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span> {:L("tianjia")}/{:L("bianji")}</strong></div>
    <div class="body-content">
      <form method="post" class="form-x" action="" enctype="multipart/form-data">
        <div class="form-group">
          <div class="label">
            <label>{:L("dengluzhanghao")}：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" value="{$info['user_name']}" name="user_name" data-validate="required:{:L('qingshuru')}{:L('dengluzhanghao')}" />
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>{:L("denglumima")}：</label>
          </div>
          <div class="field">
          <if condition="$info['password']">
            <input type="text" class="input w50" name="password" placeholder="{$info['password']}" />
            <else/>
            <input type="text" class="input w50" value="{$info['password']}" name="password" data-validate="required:{:L('qingshuru')}{:L('denglumima')}" />
          </if>
            <div class="tips"></div>
          </div>
        </div>
        
        <div class="form-group">
          <div class="label">
            <label>{:L('quanxian')}：</label>
            <input type="hidden" value="{$info['package_id']}" name="package_id" />
          </div>
          <div class="field" style="padding-top:8px;">{$info['temp']}</div>
        </div>
        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="submit"> {:L('tijiao')}</button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript">
    function preview(file)
    {
      var prevDiv = document.getElementById('preview');
      if (file.files && file.files[0])
      {
        var reader = new FileReader();
        reader.onload = function(evt){
          prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="100%" />';
        }
        reader.readAsDataURL(file.files[0]);
      }
      else
      {
        prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
      }
    }
  </script>
</body>

</html>